import React from 'react';
import './App.css';
import { connect } from 'react-redux'
function App() {
  state = {

  }
  return (
    <Provider store={store}>
      <div className="App">
        <p>
          <button onClick={() => {
            this.props.dis()
          }}>-</button>{this.props.num}<button onClick={() => {
            this.props.add()
          }}>+</button>
        </p>
      </div>
    </Provider>
  );
}
let state = state => {
  return {
    num: state.num,
  }
}
let dispatch = dispatch => {
  return {
    dis() {
      dispatch({ type: "DIS" })
    },
    add() {
      dispatch({ type: "ADD" })
    }
  }
}
export default connect(state, dispatch)(App)

